//电影管理

var express = require('express');
var router = express.Router();
var sqlQuery = require('../../../module/sql');

router.get('/', function(req, res, next) {
    res.render('admin/nav/navadd')
  });
  
  
  
  
  router.post('/',async(req,res)=>{
    let navName = req.body.navName
    let sqlStr = "insert into nav (navName,state) values(?,1)"
    await sqlQuery(sqlStr,[navName])
    res.json({
        state:"ok",
        content:"添加成功"
      })
  })
  
  

module.exports = router;
